<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>配置组列表</title>
    <link href="__ADMIN__/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="__ADMIN__/css/style.css" />
    <link href="__ADMIN__/assets/css/codemirror.css" rel="stylesheet">
    <link rel="stylesheet" href="__ADMIN__/assets/css/ace.min.css" />
    <link rel="stylesheet" href="__ADMIN__/font/css/font-awesome.min.css" />
    <script src="__ADMIN__/js/jquery-1.9.1.min.js"></script>
    <script src="__ADMIN__/assets/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__ADMIN__/Widget/Validform/5.3.2/Validform.min.js"></script>
    <script src="__ADMIN__/assets/js/typeahead-bs2.min.js"></script>
    <script src="__ADMIN__/assets/js/jquery.dataTables.min.js"></script>
    <script src="__ADMIN__/assets/js/jquery.dataTables.bootstrap.js"></script>
    <script src="__ADMIN__/js/lrtk.js" type="text/javascript"></script>
    <script src="__ADMIN__/assets/layer/layer.js" type="text/javascript"></script>
    <script src="__ADMIN__/assets/laydate/laydate.js" type="text/javascript"></script>
    <script src="__ADMIN__/js/goods_type.js" type="text/javascript"></script>
    <script type="text/javascript"> var i = {$attr_sort}; </script>
</head>

<body>
    <div class="page-content clearfix">
        <div class="administrator">
            <div class="d_Confirm_Order_style">
                <form action="{:url('GoodsType/edit')}" method="post">
                    <div class="Operate_cont clearfix">
                        <label class="form-label">商品类型名称：</label>
                        <div class="formControls ">
                            <input type="text" class="input-text" value="{$type_one['type_name']}" placeholder="" name="type_name" datatype="*"
                                   nullmsg="商品类型名称不能为空！"
                                   ajaxurl="{:url('GoodsType/ajaxTypeName',array('type_id'=>$type_one['type_id']))}">
                            <span class="Validform_checktip"></span>
                        </div>
                    </div>
                    <div class="Operate_cont clearfix">
                        <label class="form-label">是否开启：</label>
                        <div class="formControls">
                            <label>
                                <input type="radio" name="type_status" value="1" {if condition="$type_one['type_status'] eq 1"}checked{/if}>是
                            </label>
                            <label>
                                <input type="radio" name="type_status" value="0" {if condition="$type_one['type_status'] eq 0"}checked{/if}>否
                            </label>
                        </div>
                    </div>
                    <!--操作-->
                    <div class="Operate_cont clearfix">
                        <a href="javascript:;" class="btn btn-primary" Onclick="add_attr();"><i class="fa fa-plus"></i> 添加属性</a>
                    </div>
                    <!--属性列表-->
                    <div class="clearfix">
                        <div class="table_menu_list">
                            <table class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>参数名称</th>
                                    <th>参数类型</th>
                                    <th>显示方式</th>
                                    <th>参数值</th>
                                    <th>参数单位</th>
                                    <th>是否参与筛选</th>
                                    <th>排序</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                    {if condition="!empty($attr_data)"}
                                        {volist name="attr_data" id="vo"}
                                        <tr>
                                            <td>
                                                <input type="text" name="attr_name[{$vo['attr_id']}]" placeholder="输入参数名称" datatype="*"
                                                    nullmsg="参数名称不能为空！" value="{$vo['attr_name']}">
                                                <span class="Validform_checktip"></span>
                                            </td>
                                            <td>
                                                <select class="form-control" name="attr_style[{$vo['attr_id']}]">
                                                    <option value="0" {if condition="$vo['attr_style'] eq 0"}selected{/if}>参数</option>
                                                    <option value="1" {if condition="$vo['attr_style'] eq 1"}selected{/if}>规格</option>
                                                </select>
                                            </td>
                                            <td>
                                                <select class="form-control" name="attr_type[{$vo['attr_id']}]">
                                                    <option value="1" {if condition="$vo['attr_type'] eq 1"}selected{/if}>单选框</option>
                                                    <option value="2" {if condition="$vo['attr_type'] eq 2"}selected{/if}>复选框</option>
                                                    <option value="3" {if condition="$vo['attr_type'] eq 3"}selected{/if}>输入框</option>
                                                    <option value="4" {if condition="$vo['attr_type'] eq 4"}selected{/if}>下拉框</option>
                                                </select>
                                            </td>
                                            <td>
                                                <input type="text" name="attr_value[{$vo['attr_id']}]" placeholder="多个值巩逗号区分" datatype="*"
                                                    nullmsg="参数值不能为空！" value="{$vo['attr_value']}">
                                                <span class="Validform_checktip"></span>
                                            </td>
                                            <td>
                                                <input type="text" name="attr_unit[{$vo['attr_id']}]" placeholder="单位" value="{$vo['attr_unit']}">
                                            </td>
                                            <td>
                                                <input type="checkbox" name="attr_search[{$vo['attr_id']}]" value="1" {if condition="$vo['attr_search'] eq 1"} checked {/if} >
                                            </td>
                                            <td>
                                                <input type="number" name="attr_sort[{$vo['attr_id']}]"  datatype="n"
                                                    nullmsg="参数排序不能为空！" value="{$vo['attr_sort']}">
                                                <span class="Validform_checktip"></span>
                                            </td>
                                            <td>
                                                <input type="hidden" name="attr_id[{$vo['attr_id']}]" value="{$vo['attr_id']}" />
                                                <a title="删除" href="javascript:;" onclick="del_attr(this)"
                                                class="btn btn-xs btn-warning">
                                                    <i class="fa fa-trash  bigger-120"></i>
                                                </a>
                                            </td>
                                        </tr>
                                        {/volist}
                                    {/if}
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="Operate_cont clearfix">
                        <input type="hidden" name="type_id" value="{$type_one['type_id']}" />
                        <input class="btn btn-primary radius Operate_cont_btn" type="submit" value="提交">
                    </div>
                </form>
            </div>
        </div>
    </div>    
</body>

</html>